<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:define name="title">
	<h:outputText value="#{lang.NEW_COLLABORATOR}" />
</ui:define>

<body>
	<ui:composition template="layout.xhtml">
		<ui:define name="menuHeader">
			<h:outputText value="#{lang.ADMINISTRATION}" />
		</ui:define>
		<ui:define name="menuBody">
			<ui:include src="adminMenu.xhtml"></ui:include>
		</ui:define>
		<ui:define name="contentHeader">
			<h:outputText value="#{lang.NEW_PROJECT}" />
		</ui:define>
		<ui:define name="contentBody">
			<br />
			<h:form>
				<fieldset class="collab-fieldset">
					<table cellpadding="0" cellspacing="12" border="0" width="500">
						<h:form>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.DAS}" /></td>
								<td align="left"><p:inputText id="das" size="10"
										styleClass="fields"
										value="#{collaboratorsBean.newCollaborator.das}"
										required="true">
									</p:inputText> <h:message for="das" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.LASTNAME}" /></td>
								<td align="left"><p:inputText id="lastName"
										styleClass="fields"
										value="#{collaboratorsBean.newCollaborator.lastName}">
									</p:inputText> <h:message for="lastName" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.FIRSTNAME}" /></td>
								<td align="left"><p:inputText id="firstName"
										styleClass="fields"
										value="#{collaboratorsBean.newCollaborator.firstName}">
									</p:inputText> <h:message for="firstName" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.PASSWORD}" /></td>
								<td align="left"><p:password id="password"
										value="#{collaboratorsBean.newCollaborator.password}"
										feedback="true" promptLabel="#{lang.PASSWORD_PROMPT_LABEL}"
										weakLabel="#{lang.PASSWORD_WEAK_LABEL}"
										goodLabel="#{lang.PASSWORD_GOOD_LABEL}"
										strongLabel="#{lang.PASSWORD_STRONG_LABEL}" /> <h:message
										for="password" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.EMAIL}" /></td>
								<td align="left"><p:inputText id="email"
										styleClass="fields"
										value="#{collaboratorsBean.newCollaborator.email}"
										required="true">
									</p:inputText> <h:message for="email" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.BIRTHDAY}" /></td>
								<td align="left"><p:calendar styleClass="datepicker"
										showButtonPanel="true" navigator="true" id="birthday"
										value="#{collaboratorsBean.newCollaborator.birthday}"></p:calendar>
									<h:message for="birthday" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.NATIONALITY}" /></td>
								<td align="left"><p:inputText id="nationality"
										styleClass="fields"
										value="#{collaboratorsBean.newCollaborator.nationality}">
									</p:inputText> <h:message for="nationality" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.SEX}" /></td>
								<td align="left"><p:selectOneRadio id="sex"
										value="#{collaboratorsBean.newCollaborator.sex}">
										<f:selectItem itemLabel="#{lang.SEX_F}" itemValue="Female"></f:selectItem>
										<f:selectItem itemLabel="#{lang.SEX_M}" itemValue="Male"></f:selectItem>
									</p:selectOneRadio> <h:message for="sex" /></td>
							</tr>
							<tr>
								<td class="auth-label" width="200"><h:outputText
										value="#{lang.RULE}" /></td>
								<td align="left"><p:selectOneMenu id="gender"
										value="#{collaboratorsBean.newCollaborator.rule}">
										<f:selectItems value="#{ruleBean.ruleValues}" var="rule"
											itemValue="#{rule}" itemLabel="{lang[rule]}" />
									</p:selectOneMenu> <h:message for="rule" /></td>
							</tr>

							<tr>
								<td colspan="2"><h:commandButton value="#{lang.ADD}"
										process="@this" action="#{collaboratorsBean.addCollaborator}"></h:commandButton>
									<h:commandButton value="#{lang.CANCEL}" onclick="dlg.hide()"></h:commandButton></td>
							</tr>
						</h:form>
					</table>
				</fieldset>
			</h:form>
			<p:dialog id="dlg">

			</p:dialog>
			<br />
			<br />
			<br />
			<br />
		</ui:define>

	</ui:composition>
</body>
</html>